package pile.customer.service;

import cn.hutool.json.JSONObject;
import org.springframework.web.multipart.MultipartFile;
import pile.customer.entity.ResponseResult;
import pile.customer.params.ReceivingInformation;

import java.io.File;
import java.io.IOException;

public interface IWeChatService {


    /**
     * 请求接口验证
     * @param signature
     * @param timestamp
     * @param nonce
     * @param echostr
     * @return
     */
    String receiveGetRequest(String signature, String timestamp, String nonce, String echostr);

    /**
     * 接受消息
     * @param
     * @return
     */
    String acceptMessage(JSONObject data) throws Exception;

    /**
     * 发送给微信服务器
     * @param receivingInformation
     */
    ResponseResult sendMessage(ReceivingInformation receivingInformation);

    /**
     * 新增图片素材
     * @param uploadTempMedia
     * @param file
     * @return
     */
    ResponseResult uploadTempMedia(String uploadTempMedia, MultipartFile file) throws IOException;

    /**
     * 微信获取客服消息内的临时素材
     * @param mediaId
     * @param channel
     * @return
     */
    ResponseResult getTempMedia(String mediaId, Integer channel) throws IOException;
}
